package book;

public class Edition implements Comparable<Edition>{

	private String ed;
	private double price;
	
	public Edition(String e, double p) {
		ed = e;
		price = p;
	}

	/**
	 * @return the ed
	 */
	public String getEd() {
		return ed;
	}

	/**
	 * @return the price
	 */
	public double getPrice() {
		return price;
	}
	
	/**
	 * Saves the given price and returns it
	 */
	public double setPrice(double p) {
		return price = p;
	}

	@Override
	public int compareTo(Edition e) {
		return getEd().compareTo(e.getEd());
	}
}
